//
//  UIView+Extension.h
//  iOS Object
//
//  Created by 保密 on 2019/6/26.
//  Copyright © 2019年 XiaoHaiBao. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_OPTIONS(NSUInteger, UIBorderSideType) {
    UIBorderSideTypeAll     = 0,
    UIBorderSideTypeTop     = 1 << 0,
    UIBorderSideTypeBottom  = 1 << 1,
    UIBorderSideTypeLeft    = 1 << 2,
    UIBorderSideTypeRight   = 1 << 3,
};

typedef NS_ENUM(NSUInteger, UIViewShadowPath) {
    UIViewShadowPathAll = 0,
    UIViewShadowPathLeft,
    UIViewShadowPathRight,
    UIViewShadowPathTop,
    UIViewShadowPathBottom
};

@interface UIView (Extension)

@property (nonatomic, assign) CGFloat x;
@property (nonatomic, assign) CGFloat y;
@property (nonatomic, assign) CGFloat width;
@property (nonatomic, assign) CGFloat height;
@property (nonatomic, assign) CGFloat centerX;
@property (nonatomic, assign) CGFloat centerY;
@property (nonatomic, assign) CGSize size;
@property (nonatomic, assign) CGPoint origin;

/**
 从xib加载View
 
 @return return value description
 */
+ (instancetype)loadViewFromNib;

/**
 删除当前视图内的所有子视图
 */
- (void)removeChildViews;

/**
 设置View某个角为圆角
 
 @param corners UIRectCorner
 @param radius 圆角大小
 */
- (void)setCornerRadiusWithRoundingCorners:(UIRectCorner)corners radius:(CGFloat)radius;

@end

NS_ASSUME_NONNULL_END
